from flask import Flask,make_response,json,jsonify

app = Flask(__name__)

app.config['JSON_AS_ASCII'] = False

@app.route('/index')
def index():
    data = {
        "name":"张三",
        "list":[
            {
                "id":1,
                "name":"lishi",
                "age":20,
                "sex":"男"
            },
            {
                "id": 2,
                "name": "张三",
                "age": 20,
                "sex": "女"
            }
        ]
    }
    # response = make_response(json.dumps(data,ensure_ascii = False))
    # response.mimetype="application/json"
    # return response
    return jsonify(data)

if __name__ == '__main__':
    app.run()